1. Field of the Invention
The present invention relates to a prediction-based dynamic thread pool management method and an agent platform using the same; and, more particularly, a prediction-based dynamic thread pool management method capable of preventing a delay of response time by generating a thread with previously predicting the number of required threads and performing quick management by suppressing unnecessary waste of resources by increasing the efficiency of resource utilizations and an agent platform using the same.
2. Background of the Related Art
Recently, real-time system technologies such as wireless communications, mobile computing and intelligent agents have realized new paradigms of applications for accessing information anytime and anywhere. The applications for an ubiquitous system need not only to utilize resources distributed and environment but also to provide intelligent services to users.
In order to satisfy these requirements, the applications should require a high degree of flexibility and adaptability in order to deal with dynamic ubiquitous environments and heterogeneous platforms. Also, the applications should be realized by the use of the intelligent agents which provide customized services to each user.
Moreover, the platform itself should be able to provide an optimized service of platform level. Generally, in order to realize this, an agent platform has used a multi-thread model to support a concurrency to simultaneously provide the services to the agents.
Briefly to describe the agent platform, firsts the agent denotes software which automatically carries out a job which the user desires on behalf of the user in a user's view. The character of agent can be autonomy, intelligence, mobility, social ability or the like.
In addition to the basic characteristics of the agent, the agent has reactivity to respond against a change in an environment, veracity to prevent exchange of wrong information and rationality to achieve an object by the use of a rational method.
The agent is largely classified into a multi-agent and a mobile-agent. The multi-agent has a structure in which complicated and various operations, which cannot be solved by only one agent, can be carried out through collaboration between agents and the mobile-agent has a structure in which a program itself moves through a network so as to process tasks depending on a user's object.
The agent platform should support agent communication languages such as ACL (Agent Communication Language) and KQML (Knowledge Query Manipulation Language) so that the agents existing on heterogeneous systems collaborate with each other. Currently, agent platforms such as JADE and Aglets have been widely used.
Herein, FIPA (Foundation for Intelligent Physical Agents) agent management specifications identify roles of key agents required for managing the platform, and describe agent management languages and ontology.
Meanwhile, thread management models such as creation and deletion of a thread have been proposed in various forms under an environment of a computing system such as an agent system.
A thread per request model creates a new thread at a user's request and deletes the created thread after processing the corresponding request. Since the thread per request model has a simple structure and is easily realized, the thread per request model is recognized as a model suitable for database searching or file transferring in which it takes a relatively long time to process one request.
However, the thread per request model creates the new thread and processes the thread when the user's request exists, and deletes the corresponding thread when the processing of the corresponding request is completed. At this time, since the thread per request model may be overloaded by the creation and deletion of the threads, the thread per request model is judged as an inefficient structure in case that it receives many requests from the users.
A worker thread pool model was proposed as an alternative to the thread per request model. The worker thread pool model previously creates a predetermined number of worker threads to form a thread pool. The worker thread pool model allocates one worker thread in the thread pool at the user's request and makes the worker thread be on standby in the thread pool when the processing is terminated.
Therefore, the worker thread pool models have advantages to shorten a response time and eliminate a danger of exhaustion of system resources caused by excessive creation of the thread by removing the overload occurring the creation and deletion of the worker thread.
However, since the predetermined number of worker threads should be maintained in spite of receipt of small number of user's requests, a predetermined amount of system resources is allocated in the worker thread pool model. Even though system resources to which the thread pool is allocated remain, the user's request should be on standby until the worker thread completes the previous operation in case of receipt of larger number of user's requests. As described above, the worker thread pool model has a defect that the system resource cannot be efficiently utilized.
A watermark thread pool model has been developed to efficiently utilize the system resource while maintaining a response time to the user's request short by dynamically changing the size of thread pool according to the user's request amount.
Low and high watermarks are set in the worker thread pool and the worker thread as high as the low watermark is previously created at the time of starting a service. When all threads as high as the low watermark are used due to the large number of user's requests, the worker threads which will process the user's request are created before the high watermark.
However, the watermark thread pool model cannot provide an optimized solution from the viewpoint of the response time or efficient usage of the system resource accompanied by creation of the threads in that it changes the size of the thread pool in case of receipt of the user's request.